﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using System.Data.SqlClient;

namespace _1241118_DoAn_hqtcsdl
{
    class Connectdatabase
    {
        public SqlCommand connectdatabase(string tv)
        {
            string connect = @"Data Source=QUAN\QUAN1504;Initial Catalog=QuanLyGaSG;Integrated Security=True";
            SqlConnection sql = new SqlConnection(connect);
            string sql1 = tv;
            sql.Open();
            SqlCommand sqlcm = new SqlCommand(sql1, sql);
            return sqlcm;
        }
    }
}


